<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>添加权限</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="__LAYUI__/css/layui.css" media="all">
  <link rel="stylesheet" href="__CSS__/common/layui.form.css" media="all">
  <link rel="stylesheet" href="__STATIC__/plugs/font-awesome/css/font-awesome.min.css" media="all">
</head>
<body>
    <!--编辑页-->
    <div class="layui-container">
        <form class="layui-form" action="{:url('admin/rule/add')}" method="post">
         	<div class="layui-form-item">
			    <label class="layui-form-label">菜单</label>
			    <div class="layui-input-inline">
			      <input type="checkbox" checked="" name="ismenu" lay-skin="switch" lay-filter="switchTest" lay-text="是|否">
			    </div>
			    <div class="layui-input-inline">
			      <input type="checkbox" checked="" name="status" lay-skin="switch" lay-filter="switchTest" lay-text="有效|无效">
			    </div>
			</div>
			<div class="layui-form-item">
			    <label class="layui-form-label">父级</label>
			    <div class="layui-input-block">
			      <select  name="pid" lay-filter="pid" lay-search="">
			       	{volist name="ruledata" id="item"}
			       		<option value="{$key}">{$item}</option>
			       	{/volist}
			      </select>
			    </div>
  			</div>
  			<div class="layui-form-item">
  				<label class="layui-form-label">规则</label>
  				<div class="layui-input-block">
  					 <input class="layui-input" type="text" name="url"  autocomplete="off" placeholder="请输入权限规则">
  				</div>
  			</div>
  			<div class="layui-form-item">
  				<label class="layui-form-label">名称</label>
  				<div class="layui-input-block">
  					 <input class="layui-input" type="text" name="title" autocomplete="off" placeholder="请输入权限名称">
  				</div>
  			</div>
  			<div class="layui-form-item">
  				<label class="layui-form-label">图标</label>
  				<div class="layui-input-block">
  					 <input class="layui-input search-icon-input" type="text" name="icon" lay-verify="icon" autocomplete="off" placeholder="图标选择">
  					 <a href="javascript:;" class="layui-btn layui-btn-small btn-blue" id="searchIcon"><i class="fa fa-search"></i></a>
  				</div>
  				<div class="icon-table" id="iconTable" style="display:none;padding:3% 1% 3% 5%;background:#fff;">
			    	<div class="layui-form layui-form-pane" action="">
			  			<div class="layui-form-item">
			    			<label class="layui-form-label">搜索图标</label>
			   				<div class="layui-input-block">
			      				<input type="text" autocomplete="off" placeholder="" class="layui-input search-icon">
			    			</div>
			  			</div>
			  		</div>
  					{include file="index@common/fa"}
  			   </div>  
  			</div>
  			<div class="layui-form-item">
  				<label class="layui-form-label">权重</label>
  				<div class="layui-input-block">
  					 <input class="layui-input" type="number" name="sort" autocomplete="off" placeholder="排序权重">
  				</div>
  			</div>
  			<div class="layui-form-item">
  				<label class="layui-form-label">规则条件</label>
  				<div class="layui-input-block">	
      				<textarea name="condition" placeholder="请输入内容" class="layui-textarea"></textarea>
  				</div>
  			</div>
  			<div class="layui-form-item">
  				<label class="layui-form-label">备注</label>
  				<div class="layui-input-block">	
      				<textarea name="remark" placeholder="请输入内容" class="layui-textarea"></textarea>
  				</div>
  			</div>
			<div class="layui-form-item">
			    <div class="layui-input-block">
			      <button class="layui-btn btn-green" lay-submit="" lay-filter="save">保存</button>
			      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
			    </div>
		  	</div>
        </form>
    </div>
   
    <script type="text/javascript" src="__LAYUI__/layui.js"></script>
    <script type="text/javascript" src="__JS__/admin/rule.js"></script>
       

</body>
</html>           

